from DataFilter import DataFilter

import re

class UrlDataFilter(DataFilter):

	def filter(self, data):
		buf = re.sub("^\s+$", "", data)
		buf = re.sub("[^a-zA-Z0-9'.!:?/=&-_ ]", "", buf)
		buf = re.sub("^&$", "", buf)
		buf = re.sub("\s{2,}", " ", buf)
		return buf 
